import Vue from 'vue'
import CVuex from "../utils/Cuex/Cuex.js";

Vue.use(CVuex)


export default new CVuex({
    state: {
        count: 0
    },
    mutations: {
        add(state, payload) {
            state.count += payload;
        }
    },
    actions: {
        handleAdd({commit}, payload) {
            setTimeout(() => {
                commit("add", payload)
            }, 1000)
        }
    },
})
